#ifndef __KEY_PROCESS_H
#define __KEY_PROCESS_H
#include "user_cfg.h"
#include "key_scan.h"

#define KEY_IMAGE_MSG       MSG_K1_PRESS
#define KEY_LOAD_MSG        MSG_K2_PRESS
#define KEY_VOL_ADD_MSG     MSG_K3_PRESS
#define KEY_VOL_SUB_MSG     MSG_K4_PRESS

typedef enum {
    KEY_EVENT_NONE = -1,
    KEY_IMAGE = 0,
    KEY_LOAD = 1,
    KEY_VOL_ADD = 2,
    KEY_VOL_SUB = 3,
    KEY_SCREEN2_RET = 5,
    KEY_SCREEN1_RET = 4,
} key_event_t;

typedef enum {
    PAGE1 = 0,
    PAGE2 = 1,
    PAGE3 = 2,
} cur_page_t;

typedef struct {
    int8_t send_value;
    cur_page_t cur_page;
    uint16_t cur_value;
} key_para_t;
extern key_para_t key_para;

typedef struct {
    uint16_t index;
    uint32_t (*func)(void);
} key_func_t;

void Key_Msg_Init(void);
uint32_t Key_Event_Handle(uint16_t cmd);

#endif
